<!DOCTYPE html>
<html>
<head>
    <title>闯关</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("integral:tcheckpoint:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("integral:tcheckpoint:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("integral:tcheckpoint:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
			<a class="btn btn-primary" @click="stopOrstart"><i class="fa fa-pencil-square-o"></i>&nbsp;启用/停用</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
					<div class="form-group">
                        <div class="col-sm-2 control-label">闯关标题</div>
                        <div class="col-sm-10">
                            <input id="title" type="text" class="form-control" v-model="tCheckpoint.title" placeholder="闯关标题"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">题目数量</div>
                        <div class="col-sm-10">
                            <input id="questionNum" type="text" class="form-control" v-model="tCheckpoint.questionNum" placeholder="题目数量"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">闯关总人数</div>
                        <div class="col-sm-10">
                            <input id="peopleNum" type="text" class="form-control" v-model="tCheckpoint.peopleNum" placeholder="闯关总人数"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">闯关资格积分</div>
                        <div class="col-sm-10">
                            <input id="integral" type="text" class="form-control" v-model="tCheckpoint.integral" placeholder="闯关资格积分"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">成功获取积分</div>
                        <div class="col-sm-10">
                            <input id="success" type="text" class="form-control" v-model="tCheckpoint.success" placeholder="成功获取积分"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">失败扣除积分</div>
                        <div class="col-sm-10">
                            <input id="fail" type="text" class="form-control" v-model="tCheckpoint.fail" placeholder="失败扣除积分"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">闯关难度</div>
                        <div class="col-sm-10">
                            <input id="grade" type="text" class="form-control" v-model="tCheckpoint.grade" placeholder="闯关难度 1代表1颗星 2代表2颗星"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">顺序</div>
                        <div class="col-sm-10">
                            <input id="orders" type="text" class="form-control" v-model="tCheckpoint.orders" placeholder="顺序"/>
                        </div>
                    </div>
					<!-- <div class="form-group">
                        <div class="col-sm-2 control-label">是否禁用</div>
                        <div class="col-sm-10">
                            <input id="disFlag" type="text" class="form-control" v-model="tCheckpoint.disFlag" placeholder="是否禁用 0 未禁用 1禁用"/>
                        </div>
                    </div> -->
					<div class="form-group">
                        <div class="col-sm-2 control-label">每道题答题时间</div>
                        <div class="col-sm-10">
                            <input id="times" type="text" class="form-control" v-model="tCheckpoint.times" placeholder="每道题答题时间 以秒为单位"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">图片路径</div>
                        <div class="col-sm-10">
                            <input type="file" id="imageId" class="form-control"  placeholder="图片路径"/>
                        </div>
                    </div>
                    <div class="form-group">
						<div class="col-sm-2 control-label">图片路径</div>
                        <img v-if="imageUrl!=null" class="imageClass" :src="imageUrl">
                    </div>

			<div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/integral/tcheckpoint.js?_${.now?long}"></script>
</body>
<style>
	.imageClass{
		width: 200px;
	    height: 100px;
	}
</style>
</html>